import java.lang.reflect.Method;

public class Main {
    public static void main(String[] args) throws IllegalAccessException, InstantiationException, NoSuchMethodException {
        Class clazz=Demo.class;
        Demo demo=(Demo)clazz.newInstance();
        Method method=clazz.getDeclaredMethod("add", int.class, int.class);
        //返回了我们自己开发的注解(方法上的注解)
        Test annotation = method.getAnnotation(Test.class);
        System.out.println(annotation.desc());
        System.out.println(annotation.value());
    }
}
